<div class="ribbon">
    <a href=""><span class="home fa fa-home"></span></a>
    <ol class="breadcrumb">
        <li>订单列表</li>
    </ol>
</div>

<div class="table-wrapper">

    <div class="toolbar">
        <form role="form">
            <div class="">
                <!--<div class="col-md-3">-->
                    <!--<div class='input-group date' id='datetimepickerStart'>-->
                        <!--<span class="input-group-addon ">起始时间</span>-->
                        <!--<input type='text' class="form-control input-sm"/>-->
                <!--<span class="input-group-addon">-->
                    <!--<span class="glyphicon glyphicon-calendar"></span>-->
                <!--</span>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="col-md-3">-->
                    <!--<div class='input-group date' id='datetimepickerEnd'>-->
                        <!--<span class="input-group-addon">结束时间</span>-->
                        <!--<input type='text' class="form-control input-sm"/>-->
                <!--<span class="input-group-addon">-->
                    <!--<span class="glyphicon glyphicon-calendar"></span>-->
                <!--</span>-->
                    <!--</div>-->
                <!--</div>-->

                <!--<div class="col-sm-8 input-width">-->
                    <!--<label class="input">订单状态：</label>-->
                    <!--<label class="input"><select  ng-model="q.orderStatus" ng-options="orderStatus.value for orderStatus in vm.orderStatus" class="form-control" ng-selected="" ng-change="orderStatusSearchChange()"></select></label>-->
                <!--</div>-->
            </div>
            <!--<div class="" style="margin-top: 10px">-->
                <!--<div class="inline-group col-md-12">-->
                    <!--<label class="input">订单号：</label>-->
                    <!--<label class="input"><input type="text" class="form-control input-sm" ng-model="q.orderSn" ng-change="search()" placeholder="订单号"> </label>-->

                    <!--<label class="input">客户编号：</label>-->
                    <!--<label class="input"><input type="text" class="form-control input-sm" ng-model="q.userId" ng-change="search()" placeholder="客户编号"> </label>-->

                    <!--<label class="input">呼入电话：</label>-->
                    <!--<label class="input"><input type="text" class="form-control input-sm" ng-model="q.callInPhone" ng-change="search()" placeholder="呼入电话"> </label>-->

                    <!--<button type="submit" class="btn btn-md btn-primary pull-right" ng-click="search()"><i class="fa fa-search"></i> 搜索 </button>-->
                <!--</div>-->
            <!--</div>-->
        </form>
    </div>
    <table class="table table-striped table-hover props table-sm">
        <thead>
        <tr>
            <th width="1%"></th>
            <th width="3%">序号</th>
            <th width="3%">类型</th>
            <th width="5%">订单编号</th>
            <th width="4%">订单状态</th>
            <th width="4%">接入方式</th>
            <th width="4%">支付方式</th>
            <th width="5%">订单客户</th>


            <th width="15%">收货地址</th>
            <th width="4%">收货人</th>
            <th width="4%">配送员</th>
            <th width="5%">所属门店</th>
            <th width="4%">金额(元)</th>
            <th width="4%">支付状态</th>
            <th width="4%">用户评价</th>

            <th width="9%">创建时间</th>
            <th width="9%">预约时间</th>
            <th width="15%">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="order in vm.orderList" ng-class="{danger:order.timeSpan>10&&order.orderStatus==0}">
            <td></td>
            <td class="message">{{$index+1+pager.pageSize*(pager.getCurPageNo()-1)}}</td>
            <td ng-if="order.orderTriggerType.index==1">
                <div style="width:40px;height:40px;background-color:#F0F; border-radius: 50%;color:#FFF;text-align:center;line-height:40px;:middle;font-size: large">斤
                </div>
            </td>
            </td>
            <td ng-if="order.orderTriggerType.index!=1" >
                <div style="width:40px;height:40px;background-color:#00F; border-radius: 50%;color:#FFF;text-align:center;line-height:40px;:middle;font-size: large">瓶
                </div>
            </td>
            <td class="message">{{order.orderSn}}</td>
            <td class="message">{{vm.orderStatusDisplay[order.orderStatus]}}</td>
            <td class="message">{{order.accessType.name}}</td>
            <td class="message">{{order.payType.name}}</td>
            <td class="message">{{order.customer.userId}}</td>


            <td class="message">{{order.recvAddr.province}}{{order.recvAddr.city}}{{order.recvAddr.county}}{{order.recvAddr.detail}}</td>
            <td class="message" title="电话：{{order.recvPhone}}">{{order.recvName}}</td>

            <td class="message" title="姓名：{{order.dispatcher.name}} 电话：{{order.dispatcher.mobilePhone}} 工号：{{order.dispatcher.jobNumber}}">{{order.dispatcher.userId}}</td>

            <td class="message">{{order.dispatcher.department.name}}</td>
            <td class="message">{{getFixData(order.orderAmount)}}</td>
            <td class="message">{{order.payStatus.name}}</td>
            <td class="message">{{order.orderServiceQuality.name}}</td>
            <td class="message">{{order.createTime}}</td>
            <td class="message">{{order.reserveTime}}</td>
            <td class="operate">
                <button title="详情" ng-click="viewDetails(order)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">详情</i>
                </button>
                <!--<button title="修改" ng-click="modify(order)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                <!--<i class="fa fa-edit"></i>-->
                <!--</button>-->

                <button title="核单" ng-if="order.taskId" ng-click="check(order)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">核单</i>
                </button>
                <!--<button title="作废" ng-click="delete(order)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                <!--<i class="fa fa-trash-o"></i>-->
                <!--</button>-->
            </td>
        </tr>
        </tbody>
    </table>
    <div ng-if="vm.orderList.length == 0" nj-table-no-data></div>
    <div nj-pager pager="pager"></div>
</div>
